import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        // 读取人数


        // 创建集合并读取数据
        ArrayList<Integer> list = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            list.add(sc.nextInt());
        }

        int n1 = sc.nextInt();
        for (int i = 0; i < n1; i++) {
            int x = sc.nextInt();
            list.set(x-1, list.get(x-1) +10);



        }
     for (int i = 0; i < 10; i++) {
         System.out.print(list.get(i));
         if (i != list.size() - 1) { // 最后一个元素后不加 "."
             System.out.print(" ");
         }


     }

        sc.close();
    }
}